package com.haoji.upload.controller;

import com.haoji.upload.dto.UserDTO;
import com.haoji.upload.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @program: upload
 * @description:
 * @author: xiaolei
 * @create: 2021-04-21 09:49
 **/
@RestController
public class RocketMqController {

    @Autowired
    private UserService userService;
    @GetMapping("/testAddUser")
    public String testAddUser() {
        // 模拟发送数据
        UserDTO user = new UserDTO(UUID.randomUUID().toString().replace("-", ""), "张三", "123456");
        userService.addUser(user);
        return "success";
    }
}
